package schoolWork.work03.text6;


public class NumericQuestion extends Question{

    public NumericQuestion(String text) {
        super.setText(text);
    }

    @Override
    public boolean checkAnswer(String response) {
        //如果和答案4.5相差值小于0.05则返回一个true
        return Math.abs(4.5 - Double.parseDouble(response)) < 0.05;
    }
}
